if modifier_rubick_motion == nil then
    modifier_rubick_motion = class({})
end

function modifier_rubick_motion:OnCreated()
	local caster = self:GetParent()
	--self.part = ParticleManager:CreateParticle("particles/move_rubick.vpcf",PATTACH_ABSORIGIN_FOLLOW,caster)
	self.part = ParticleManager:CreateParticle("particles/econ/items/rubick/rubick_puppet_master/rubick_telekinesis_puppet.vpcf",PATTACH_ABSORIGIN_FOLLOW,caster)
	local pos = caster:GetAbsOrigin()
	ParticleManager:SetParticleControl(self.part,0,pos)
	ParticleManager:SetParticleControl(self.part,1,pos)
	ParticleManager:SetParticleControl(self.part,2,Vector(20,0,0))
end

function modifier_rubick_motion:IsHidden()
	return true
end

function modifier_rubick_motion:OnDestroy()
	ParticleManager:DestroyParticle(self.part,false)
end

function modifier_rubick_motion:DeclareFunctions()
	local funcs = {
		MODIFIER_PROPERTY_OVERRIDE_ANIMATION,
		MODIFIER_PROPERTY_TRANSLATE_ACTIVITY_MODIFIERS
	}

	return funcs
end
function modifier_rubick_motion:GetOverrideAnimation(  )
	return ACT_DOTA_OVERRIDE_ABILITY_4
end

function modifier_rubick_motion:GetActivityTranslationModifiers( )
	return "ball_lightning"
end

function modifier_rubick_motion:CheckState()
	local state = {
		[MODIFIER_STATE_NO_HEALTH_BAR] = true,
		[MODIFIER_STATE_COMMAND_RESTRICTED] = true,
		[MODIFIER_STATE_NO_UNIT_COLLISION] = true,
	}

	return state
end
